<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns="http://www.w3.org/1999/html">
<head>
    <base th:href="${#request.getContextPath()}+'/'">
    <meta charset="UTF-8">
    <title>二维码</title>
<style type="text/css">
    .d1{
        position: absolute;
        top: 30%;
        left: 50%;
        -webkit-transform: translate(-50%,-50%);
        -moz-transform: translate(-50%,-50%);
        -ms-transform: translate(-50%,-50%);
        -o-transform: translate(-50%,-50%);
        transform: translate(-50%,-50%);
    }
    .d2{
        position: absolute;
        top: 50%;
        left: 50%;
        -webkit-transform: translate(-50%,-50%);
        -moz-transform: translate(-50%,-50%);
        -ms-transform: translate(-50%,-50%);
        -o-transform: translate(-50%,-50%);
        transform: translate(-50%,-50%);
        text-align: center;
    }
    .d3{
        position: absolute;
        top: 70%;
        left: 50%;
        -webkit-transform: translate(-50%,-50%);
        -moz-transform: translate(-50%,-50%);
        -ms-transform: translate(-50%,-50%);
        -o-transform: translate(-50%,-50%);
        transform: translate(-50%,-50%);
    }
</style>
</head>
<body>
    <span id="token" th:text="${token}" style="display: none"></span>
    <div class="d1">
   <img th:src="${url}" class="d1"/>
    </div>
    <div class="d2">
        <h1>请使用手机钉钉扫描二维码进行登陆</h1>
        <h1 >&nbsp;&nbsp;<span id="time" style="color: red">180</span>&nbsp;s后二维码失效</h1>
    </div >
    <div class="d3">
        <h2 style="color: #f1a417">提示:1.请尽快扫码登陆</h2>
        <h2 style="color: #f1a417">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;2.如若登陆失败，请刷新二维码再次扫码</h2>
    </div>


<script type="text/javascript" src="/js/jquery.min.js"></script>
<script type="text/javascript" src="/js/bootstrap.min.js"></script>
<script type="text/javascript">;</script>
<script src="/jquery-3.1.1.js"></script>

<script language="JavaScript">
    var token = document.getElementById("token").innerHTML;
    setTimeout(window.location="http://10.238.9.131:80/toIndex?token="+token,5000);
    var timeName = document.getElementById('time');
    var t = 180;
    var timer = setInterval(function () {
        timeName.innerHTML = t;
        t--;
        if (t<0){
            clearInterval();
        }
    },1000)
</script>
</body>
</html>